package com.quectel.core.module.household.dto;

import com.quectel.core.module.village.dto.VillageDto;
import com.quectel.core.module.village.dto.VillageRoomDto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

import java.io.Serializable;
import java.util.Date;

/**
 * 人员审核表
 *
 * @author rananxin
 * @email: ryan.ran@quectel.com
 * @date 2021-12-14 09:31:59
 */
@Data
@Schema
public class HouseholdAuditDto implements Serializable {

    /**
     *
     */
    @Schema(description = "")
    private Long id;

    /**
     * 租户id
     */
    @Schema(description = "租户id")
    private Long tenantId;

    /**
     * 来源 1住户认证 2为他人认证
     */
    @Schema(description = "来源 1住户认证 2为他人认证")
    private Byte source;

    /**
     * 申请人id source1、2为mobileUserId
     */
    @Schema(description = "申请人id source1、2为mobileUserId")
    private Long applyUserId;

    /**
     * 姓名
     */
    @Schema(description = "姓名")
    private String name;

    /**
     * 手机号码
     */
    @Schema(description = "手机号码")
    private String mobile;

    /**
     * 性别 0女 1男
     */
    @Schema(description = "性别 0女 1男")
    private Byte gender;

    /**
     * 人脸照片
     */
    @Schema(description = "人脸照片")
    private String faceImg;

    /**
     * 证件类型1身份证2护照3…
     */
    @Schema(description = "证件类型1身份证2护照3…")
    private Byte cardType;

    /**
     * 身份证号码
     */
    @Schema(description = "身份证号码")
    private String cardNo;

    /**
     * 证件照片
     */
    @Schema(description = "证件照片")
    private String cardImg;

    /**
     * 所属小区
     */
    @Schema(description = "所属小区")
    private Long villageId;

    /**
     * 房间id
     */
    @Schema(description = "房间id")
    private Long roomId;

    /**
     * 身份类别 1业主2租客3家人
     */
    @Schema(description = "身份类别 1业主2租客3家人")
    private Byte identityCategory;

    /**
     * 0初始化 1审核通过 2审核不通过
     */
    @Schema(description = "0初始化 1审核通过 2审核不通过")
    private Byte auditStatus;

    /**
     * 审核意见
     */
    @Schema(description = "审核意见")
    private String auditOpinion;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 创建人
     */
    @Schema(description = "创建人")
    private String creator;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private Date createTime;

    /**
     * 修改人
     */
    @Schema(description = "修改人")
    private String editor;

    /**
     * 修改时间
     */
    @Schema(description = "修改时间")
    private Date editTime;

    @AllArgsConstructor
    public enum SourceEnum {

        HOUSEHOLD_AUDIT((byte) 1),
        HOUSEHOLD_ADD_MEMBER((byte) 2);

        @Getter
        private Byte type;
    }

    @AllArgsConstructor
    public enum AuditStatusEnum {

        AUDIT_INIT((byte) 0),
        AUDIT_SUCCESS((byte) 1),
        AUDIT_FAIL((byte) 2);

        @Getter
        private Byte status;
    }

    @AllArgsConstructor
    public enum IdentityCategoryEnum {

        OWNER((byte) 1),
        TENANTS((byte) 2),
        FAMILY((byte) 3);

        @Getter
        private Byte type;
    }

    /************非数据库字段 start ************/
    @Schema(description = "小区")
    private VillageDto village;

    @Schema(description = "房屋")
    private VillageRoomDto villageRoom;
    /************非数据库字段 end **************/
}
